<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>class方法继承原理</title>
</head>
<body>
    <script>
        // function User(){}
        // User.prototype.show = function(){
        //     console.log("hdr");
        // }

        // function Admin(){}
        // Admin.prototype = Object.create(User.prototype);


        class User{
            show(){
                console.log("hdr");
            }
        }

        class Admin extends User{}

        let hd = new Admin();
        hd.show();
    </script>
</body>
</html>